//package com.handle.oauth.controller;
//
//import com.nimbusds.jose.jwk.JWKSet;
//import com.nimbusds.jose.jwk.RSAKey;
//import lombok.AllArgsConstructor;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//import springfox.documentation.annotations.ApiIgnore;
//
//import java.security.KeyPair;
//import java.security.interfaces.RSAPublicKey;
//import java.util.Map;
//
//
///**
// * 获取RSA公钥接口
// *
// * @author zq
// */
//@RestController
//@AllArgsConstructor
//@ApiIgnore
//public class KeyPairController {
//
//    private final KeyPair keyPair;
//
//    @GetMapping("/rsa/publicKey")
//    public Map<String, Object> getKey() {
//        RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
//        RSAKey key = new RSAKey.Builder(publicKey).build();
//        return new JWKSet(key).toJSONObject();
//    }
//
//}
